|
SET SPRITE
This command will set whether the specified sprite restores its background and whether background transparency is ignored.
SET SPRITE Sprite Number, Backsave, Transparency
Sprite Number
Integer
The sprite number
Backsave
Integer
Backsave flag, if set to zero, the sprite will not restore its background
Transparency
Integer
Transparency flag, if set to zero, the sprite will not treat black as a transparent color
This command does not return a value.
If the backsave state is set to zero, the sprite will not restore its background and leave a trail as it moves. If the transparency state is set to zero, the sprite will not treat black as a transparent color. A transparent color in the sprite image does not write to the screen. If this feature is disabled, the sprite would appear as though drawn inside a black rectangle where transparency had previously been used. Both states are set to one as these are the most common settings. If you set the backsave state to zero, it is your responsibility to clear or paste the background each time the sprite is moved or animated. The sprite number should be specified using an integer value. The backsave and transparency states should be specified as either zero or one.
cls
load image "man.bmp",1
sprite 1,100,100,1
set sprite 1,0,1
wait 1000*8
do
paste sprite 1,mousex(),mousey()
loop
end
SPRITE Commands Menu
Index
|